<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@taglib prefix="s" uri="/struts-tags"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<html>
	<head>
		<base href="<%=basePath%>" />
		<title>Insert title here</title>
		<link href="css/validate.css" rel="stylesheet" type="text/css" />
		<link href="css/common.css" rel="stylesheet" type="text/css" />
		<script src="js/jquery-1.4.2.min.js" type="text/javascript"></script>
		<script src="js/css.js" type="text/javascript"></script>
		<script src="js/common.js" type="text/javascript"></script>
		<script src="js/validator.js" type="text/javascript"></script>

	</head>
	<body>
		<div id="man_zone">
		<div class="navbar">
			客户管理 > 客户明细
		</div>			
		<div class="toolbar">
			<input type="button" value="返回" onclick="javascript:history.back(-1)" class="button_60" onMouseOver="this.className='button_60_over'" onMouseOut="this.className='button_60'"/>
				
		</div>
		
		<div class="main_content" >
		<table width="99%" border="0" align="center" cellpadding="3" 
				cellspacing="1" align="center">
             
            <tr>
            <td width="15%" class="left_title_2">
              VIP号码:
            </td>
            <td width="85%">
              &nbsp;&nbsp;&nbsp;
              ${customer.vipCardNumber }
            </td>
          </tr>
            
			<tr>
				<td width="15%" class="left_title_1">
					姓名:
				</td>
				<td width="85%">
					&nbsp;&nbsp;&nbsp;
					${customer.name }
				</td>
			</tr>

			<tr>
				<td class="left_title_2">
					familyName:
				</td>
				<td>
					&nbsp;&nbsp;&nbsp;
                    ${customer.familyName }
				</td>
			</tr>
			
			<tr>
				<td class="left_title_1">
					givenName:
				</td>
				<td>
					&nbsp;&nbsp;&nbsp;
                    ${customer.givenName }
				</td>
			</tr>			
			
			<tr>
				<td class="left_title_2">
					国籍:
				</td>
				<td>
					&nbsp;&nbsp;&nbsp;
                    ${customer.nationality }
				</td>
			</tr>

            <tr>
              <td class="left_title_1">
                语言:
              </td>
              <td>
                &nbsp;&nbsp;&nbsp;
                          ${customer.language }
              </td>
            </tr>

			<tr>
				<td class="left_title_2">
					生日:
				</td>
				<td>
					&nbsp;&nbsp;&nbsp;
                    ${customer.birthday }
				</td>
			</tr>
            <tr>
              <td class="left_title_1">
                      地址:
              </td>
              <td>
                &nbsp;&nbsp;&nbsp;
                ${customer.address }
              </td>
            </tr>
            <tr>
              <td class="left_title_2">
                      手机:
              </td>
              <td>
                &nbsp;&nbsp;&nbsp;
                ${customer.mobilePhone }
              </td>
            </tr>
            <tr>
              <td class="left_title_1">
                      家庭电话:
              </td>
              <td>
                &nbsp;&nbsp;&nbsp;
                ${customer.homePhone }
              </td>
            </tr>
            <tr>
              <td class="left_title_2">
                      电子邮件:
              </td>
              <td>
                &nbsp;&nbsp;&nbsp;
                ${customer.email }
              </td>
            </tr>
            <tr>
              <td class="left_title_1">
                      职业:
              </td>
              <td>
                &nbsp;&nbsp;&nbsp;
                ${customer.occupation }
              </td>
            </tr>
             <tr>
              <td class="left_title_2">
                      网站:
              </td>
              <td>
                &nbsp;&nbsp;&nbsp;
                ${customer.webSite }
              </td>
            </tr>
             <tr>
              <td class="left_title_1">
                      公司:
              </td>
              <td>
                &nbsp;&nbsp;&nbsp;
                ${customer.company }
              </td>
            </tr>
             <tr>
              <td class="left_title_2">
                      备注:
              </td>
              <td>
                &nbsp;&nbsp;&nbsp;
                ${customer.note }
              </td>
            </tr>
            <tr>
              <td class="left_title_1">
                      照片:
              </td>
              <td>
                &nbsp;&nbsp;&nbsp;
                <img src="/cosima/upload/images/customer/${customer.picture }" />
              </td>
            </tr>
		
	</table>
	</div>
	</div>
	</body>
	<script language="javascript">
		$().ready(function() {
			$('form').checkForm(1);
		});

		$('#password').blur(function(){
			ShowStrong();
		 });
		 
		function CharMode(iN)
		{
			if (iN>=65 && iN <= 90)
				return 2;
			if (iN>=97 && iN <= 122)
				return 4;
			else
				return 1;
		}

		function bitTotal(num)
		{
			modes = 0;
			for(i=0; i<3; i++)
			{
				if (num & 1) modes++;
				num >>>= 1;
			}
			return modes;
		}

		function checkStrong(sPW)
		{
			Modes=0;
	
			for (i=0;i<sPW.length;i++)
			{
				//测试每一个字符的类别并统计一共有多少种模式.
				Modes|=CharMode(sPW.charCodeAt(i));
			}
			
			var btotal = bitTotal(Modes);
			if (sPW.length >= 10) btotal++;

			switch(btotal) 
			{
				case 1:
					return "pw_check_1";
					break;
				case 2:
					return "pw_check_2";
					break;
				case 3:
					return "pw_check_3";
					break;
				default:
					return "pw_check_1";
			}
		}

		function ShowStrong()
		{
			var data = checkStrong($('#password').val());
			pw_id = '#' + data;
			$(".pw_check").hide();
			$(pw_id).show();
		}
	</script>
</html>